package com.cmc.cloud.cmclink.doc.api.document.rep;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;
import java.util.Map;

/**
 * 订舱主Response VO
 *
 * @author 陈正
 */
@Schema(description = "管理后台 - 订舱 Response detail VO")
@Data
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class SoDetailRespDto {
    @Schema(description = "订舱信息")
    private SoRespDto so;
    @Schema(description = "订舱航次路径")
    private List<SoVslvoyRespDto> soVslvoyList;
    @Schema(description = "订舱预配信息")
    private List<SoForecastRespDto> soForecastList;
    @Schema(description = "订舱货物信息")
    private List<SoCargoRespDto> soCargoList;
    @Schema(description = "订舱相关方信息")
    SoScnRespDto soScn;
    @Schema(description = "订舱联系人信息")
    private List<SoContactRespDto> soContactList;
    @Schema(description = "订舱附件")
    private List<AttachmentRespDto> attachmentList;
    @Schema(description = "订舱附加要求")
    private List<RequirementsRespDto> requirementsList;
    @Schema(description = "上一个订舱 可为空")
    private Long previousSo;
    @Schema(description = "下一个订舱 可为空")
    private Long nextSo;
    @Schema(description = "BCR校验list")
    private List<SoBcrCheckRespDto> bcrCheckList;
    @Schema(description = "操作记录 list")
    private List<OperateLogRespDto> operateLogList;
    @Schema(description = "BCR校验总的结果")
    private Boolean checkBcr = true;
    @Schema(description = "打印配置")
    private DocBkConfirmPrintSetupRespDto confirmPrintSetup;
    @Schema(description = "BookingTime配置")
    private Map<String, String> timeMap;

    @Schema(description = "订舱预配信息 拆合并使用")
    private List<SoForecastRespDto> splitCombineSoForecastList;
    @Schema(description = "订舱货物信息 拆合并使用")
    private List<SoCargoRespDto> splitCombineSoCargoList;

//    public Boolean getCheckBcr() {
//        if (CollectionUtil.isNotEmpty(bcrCheckList) && bcrCheckList.stream().filter(e -> e.getCheckStatus() == false).count() > 0) {
//            return false;
//        }
//        return true;
//    }
}
